﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.InteropServices;
using System.Web;
using MyWorkBlogDAL;
using PagedList;
using PagedList.Mvc;

namespace MyWorkBlogMVC.Models
{
    public class BlogModel
    {
        public IPagedList<Blog> Blogs { get; set; }
    
        //public List<Comment> Comments { get; set; }
        //public List<Blogroll> Blogrolls { get; set; }
    }
    public class PostModel
    {
        public IPagedList<BlogPost> BlogPosts { get; set; }
        public string BlogName { get; set; }
        public string Description { get; set; }
        public string Username { get; set; }
        public string Country { get; set; }

        public string FirstName { get; set; }
        public string LastName { get; set; }
        public System.DateTime DateOfBirth { get; set; }


    }
    public class PostWithContentModel
    {
        public BlogPost BlogPosts { get; set; }
        public IPagedList<Comment> PostComments { get; set; }

        [Display(Name = "Enter your name here")]
        public string NameOfCommetor { get; set; }

        [Display(Name = "Enter your email here")]
        public string Email { get; set; }
        [Required]
        [Display(Name = "Post comment here")]
        [StringLength(200, ErrorMessage = "Your comment must not exceed 200 character")]
        public string CommentContent { get; set; }

    }
    public class EditUserPostWithCommentModel
    {
        public BlogPost BlogPosts { get; set; }
        public IPagedList<Comment> PostComments { get; set; }

    }

    
    public class ManageUserPostCommentModel
    {
        
        public Comment PostComments { get; set; }

    }
    public class UserBlogModel
    {
        public string Name { get; set; }
        public string Description { get; set; }
        public string Username { get; set; }
      
        public string Country { get; set; }
        public List<BlogPost> BlogPosts { get; set; } 

        //[Display(Name = "Post Title:")]
        //public string PostTitle { get; set; }
        //[Display(Name = "Write post here:")]
        //public string PostContent { get; set; }
        
     
    }
   
    public class BlogEditModel
    {
        public string Name { get; set; }
        public string Description { get; set; }
        public string Username { get; set; }
        [Display(Name = "Old Password")]
        [DataType(DataType.Password)]
        public string Password { get; set; }
        [Display(Name = "New Password")]
        [DataType(DataType.Password)]
        public string NewPassword { get; set; }
        public string Country { get; set; }

        [Required]

        [Display(Name = "Post content")]
        public string PostContent { get; set; }


    }
    public class CreateUserPostModel
    {
        [Display(Name = "Post Title:")]
        public string PostTitle { get; set; }
        [Display(Name = "Write post here:")]
        public string PostContent { get; set; }

        public System.DateTime PostDate { get; set; }

        public DateTime LastModifyDate { get; set; }
        public int PostId { get; set; }
    }
    public class EditUserPostContentModel
    {
        public int BlogPostId { get; set; }
        [Required]
        [Display(Name = "Post content")]
        public string PostContent { get; set; }
      
        public int BlogId { get; set; }
      
        
        [Required]
        [Display(Name = "Post title")]
        public string PostTitle { get; set; }

    }
}